<?php

namespace App\Http\Middleware;

use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Illuminate\Http\Response;

class UserLog
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @param  string|null  $guard
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
//        //写入LOG
//
//        Log::info($request->all());


        return $next($request);

//        $request->offsetSet('user_info', ['user'=>'lmk']);
//        return $next($request);

        //后置中间件
//        $response = $next($request);

//        dd($response);



    }
}
